using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace HadronData
{
    [ContentTypeWriter]
    public class WorldContentTypeWriter : ContentTypeWriter<World>
    {
        protected override void Write(ContentWriter p_contentWriter, World p_world)
        {
            p_contentWriter.Write(p_world.Name);
            p_contentWriter.WriteObject<List<Level>>(p_world.Levels);
        }

        public override string GetRuntimeReader(TargetPlatform p_targetPlatform)
        {
            return typeof(WorldContentTypeReader).AssemblyQualifiedName;
        }
    }
}
